<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
	<title>HTML 可视化编辑 DEMO</title>
	
	<!-- 资源文件引入 -->
	<script src="./HtmlVisualEditor.js"></script>
	<script src="./js/jquery-2.1.4.js"></script>
	<script src="./js/fun.js"></script>
	<script src="./js/wm.js"></script>
	<script src="./js/request.js"></script>
	<script src="./js/msg.js"></script>
	<link rel="stylesheet" href="./HtmlVisualEditor.css">

</head>
<body>



<div id="cont" style="display:none;">
	<img src="http://cdn.weiunity.com/site/341/news/bda84cbc0c9e467bb7751c10a0e75ad1.png" style="width:200px;" />
	<br/>
	<a href="abc.html">哈喽，我是个超链接</a>
	<br/>
	<div style="background-image: url('http://cdn.weiunity.com/site/341/news/4a78af26c0d345bc96683fda2be7a66a.png');">这个区域<br/>的图片是<br/>个背景图</div>
</div>



<iframe src="" id="HtmlVisualEditor_Iframe" style="width:700px; height:500px;"></iframe>


<form id="HtmlVisualEditor_EditPanel"><!-- 编辑属性的面板区域 -->请点击右侧要修改的区域</form>



<script type="text/javascript">


HtmlVisualEditor.document.iframeId = 'HtmlVisualEditor_Iframe';
HtmlVisualEditor.config.uploadImageApi = 'https://api.kefu.leimingyun.com/kefu/chat/file/uploadImage.json';

HtmlVisualEditor.config.resBasePath = './';
HtmlVisualEditor.document.setHtml('<html><head><meta http-equiv="content-security-policy" content="script-src \'none\'"></head><body>'+document.getElementById('cont').innerHTML+'</body></html>');
HtmlVisualEditor.life.loadSupportFileFinsh();
HtmlVisualEditor.life.loadFinish();


</script>



<button onclick="alert(HtmlVisualEditor.document.getHtml())">获取html源码</button>
<button onclick="window.open('', '', 'width=500px,height=500px,').document.write(HtmlVisualEditor.document.getHtml());" style="    font-size: 30px;">预览当前效果</button>

</body>
</html>
